//
//  MKAPITestPostData.m
//  MKAPITests
//
//  Created by 苏尚进 on 2022/9/14.
//  Copyright © 2022 moon. All rights reserved.
//

#import "MKAPITestPostData.h"

@interface MKAPITestPostData()
@property(nonatomic,strong) NSDictionary *postResult;
@end

@implementation MKAPITestPostData
- (void)doRunTask{
    [super doRunTask];
    MKAPIRequestParamJSON *requestParam = [[MKAPIRequestParamJSON alloc] init];
    [self configCommonRequest:requestParam path:@"/post"];
    requestParam.jsonParam.P(@"filesize", @"small");
    requestParam.httpMethod = MKAPIHttpRequestMethodPOST;
    [requestParam.jsonParam addDictionary:self.postParam.dictionary];
    [self sendRequestWithParam:requestParam withCompletion:^(__kindof MKAPIHttpRequestBase * _Nullable requestTask, BOOL success, NSError * _Nullable error) {
        self.postResult = requestTask.responseJson[@"json"];
        [self completeWithError:error];
    }];
}
@end
